// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */


//采购部门
import Purchase from '@/views/buy/Purchase';
import Purchase1 from '@/views/buy/Purchase1';
//销售部门
import Sale from '@/views/sale/Sale';
import Sale1 from '@/views/sale/Sale1';
import Sale_history from '@/views/sale/Sale_history';
/**
 * 库存管理
 */
// 
import Order from '@/views/pay/Order';
import Order1 from '@/views/pay/Order1';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';



// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/buy/Purchase',
            name: '采购服装',
            component: Purchase,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/buy/Purchase1',
            name: '采购食品',
            component: Purchase1,
            meta: {
                requireAuth: true
            }
            
        }, {
            path: '/sale/Sale',
            name: '销售服装',
            component: Sale,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/sale/Sale1',
            name: '销售食品',
            component: Sale1,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/sale/Sale_history',
            name: '销售记录',
            component: Sale_history,
            meta: {
                requireAuth: true
            }    
        }, {
            path: '/pay/Order',
            name: '服装类库存',
            component: Order,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/Order1',
            name: '食品类库存',
            component: Order1,
            meta: {
                requireAuth: true
            }
        },{
            path: '/system/user',
            name: '用户管理',
            component: user,
            meta: {
                requireAuth: true
            }
        }]
    }]
})